using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Server;

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddGrpc();
builder.WebHost.ConfigureKestrel(options =>
{
    options.ListenLocalhost(5000);
    options.ListenLocalhost(5001, listener => listener.UseHttps());
});

var app = builder.Build();
app.MapGrpcService<InternalService>().RequireHost("*:5001");
app.MapGrpcService<ExternalService>().RequireHost("*:5000");

app.Run();
